package com.android.jay.wzp_voice;

import android.animation.ValueAnimator;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;

import com.android.jay.lib_commin_ui.FlexibelLayout;
import com.android.jay.lib_commin_ui.circle_progress.ProgressCircleView;
import com.android.jay.lib_commin_ui.lettersidebar.LetterSideBar;

import androidx.annotation.Nullable;

/**
 * Created by wzp on 2020/2/14 0014.
 * <p>
 * 描述  ：todo
 */
public class TestActivity extends Activity implements LetterSideBar.LetterTouchListener {
    private ProgressCircleView mProgress;
    private LetterSideBar mLetter;
    private ImageView mTestIv;
    private FlexibelLayout mLayoutFL;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.test_activity_layout);
        mTestIv = findViewById(R.id.testIV);
        mLayoutFL = findViewById(R.id.fllay);


//        mLetter = findViewById(R.id.letter);
//        mLetter.setLetterTouchListener(this);
//        mProgress = findViewById(R.id.progress_circular);
//        mProgress.setmMax(5000);
//        final ValueAnimator animator = ValueAnimator.ofFloat(0, 5000);
//        animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
//            @Override
//            public void onAnimationUpdate(ValueAnimator valueAnimator) {
//                float current = (float) animator.getAnimatedValue();
//                mProgress.setmCurrent((int) current);
//            }
//        });
//        animator.setDuration(2000);
//        animator.start();
//


    }

    @Override
    protected void onResume() {
        super.onResume();
        mLayoutFL.setHeader(mTestIv);
    }

    @Override
    public void touch(String letter, boolean isTouch) {
        Toast.makeText(this, letter + isTouch, Toast.LENGTH_LONG).show();
    }
}
